// com.lesso.cyg.sunflower.infra.assembler.AttendanceRuleAssembler.java
package com.lesso.cyg.sunflower.infra.assembler;

import com.lesso.cyg.sunflower.model.AttendanceRule;
import com.lesso.cyg.sunflower.pojo.dto.AttendanceRuleDTO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 考勤规则装配器
 */
@Mapper
public interface AttendanceRuleAssembler {
    AttendanceRuleAssembler INSTANCE = Mappers.getMapper(AttendanceRuleAssembler.class);

    // 实体与DTO互转
    AttendanceRule dtoToEntity(AttendanceRuleDTO dto);
    AttendanceRuleDTO entityToDto(AttendanceRule entity);

    // 集合转换
    List<AttendanceRuleDTO> entityListToDtoList(List<AttendanceRule> entityList);
    List<AttendanceRule> dtoListToEntityList(List<AttendanceRuleDTO> dtoList);
}